package com.chainyoung.component_tmperson.ui.mvp.model;


import com.chainyoung.common.di.scope.ActivityScope;
import com.chainyoung.common.integration.IRepositoryManager;
import com.chainyoung.common.mvp.BaseModel;
import com.chainyoung.common.utils.RxUtils;
import com.chainyoung.component_tmperson.api.PersonService;
import com.chainyoung.component_tmperson.ui.mvp.contract.AboutProtocolContact;

import javax.inject.Inject;

import io.reactivex.Flowable;

@ActivityScope
public class ProtocolModel extends BaseModel implements AboutProtocolContact.Model {

    @Inject
    ProtocolModel(IRepositoryManager repositoryManager) {
        super(repositoryManager);

    }




    @Override
    public Flowable<String> getProtocol() {
        return mRepositoryManager.obtainRetrofitService(PersonService.class)
                .getProtocol()
                .compose(RxUtils.<String>handleResult());
    }
}
